Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Part of #121876.

r? @jieyouxu

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 29, 2024

The run-make-support library was changed

cc @jieyouxu

Some changes occurred in run-make tests.

cc @jieyouxu

@GuillaumeGomez GuillaumeGomez force-pushed the migrate-run-make-crate-data-smoke branch from 6379f9a to de1d0e0 Compare May 29, 2024 14:10
);
compare_stdout(
rustc().print("file-names").input("lib.rs").run(),
rust_lib("mylib").file_name().unwrap().to_string_lossy(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: rust_lib is a bit weird because it constructs a path under tmp_dir() and then joins the library name. Then to get the filename we have to do this long .file_name().unwrap().to_string_lossy() dance.

I know we currently have it defined as

/// Construct a path to a rust library (rlib) under `$TMPDIR` given the library name. This will return a
/// path with `$TMPDIR` joined with the library name.
pub fn rust_lib(name: &str) -> PathBuf {
    tmp_dir().join(format!("lib{name}.rlib"))
}

should we introduce a helper that's only responsible for calculating the rlib name itself?

fn rlib_name(name: &str) -> String {
    format!("lib{name}.rlib")
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be much better indeed! Doing it.

);
compare_stdout(
rustc().print("file-names").input("lib.rs").run(),
rust_lib_name("mylib"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like how this reads much better :3

@jieyouxu
Copy link
Member

Thanks, r=me after CI is green

@GuillaumeGomez
Copy link
Member Author

@bors r=jieyouxu rollup

@bors
Copy link
Collaborator

bors commented May 29, 2024

📌 Commit 301d722 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 29, 2024
fmease added a commit to fmease/rust that referenced this pull request May 29, 2024
…ate-data-smoke, r=jieyouxu

Migrate `run-make/crate-data-smoke` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#125653 (Migrate `run-make/const-prop-lint` to `rmake.rs`)
 - rust-lang#125662 (Rewrite `fpic`, `simple-dylib` and `issue-37893` `run-make` tests in `rmake.rs` or ui test format)
 - rust-lang#125699 (Streamline `x fmt` and improve its output)
 - rust-lang#125701 ([ACP 362] genericize `ptr::from_raw_parts`)
 - rust-lang#125723 (Migrate `run-make/crate-data-smoke` to `rmake.rs`)
 - rust-lang#125733 (Add lang items for `AsyncFn*`, `Future`, `AsyncFnKindHelper`'s associated types)
 - rust-lang#125734 (ast: Revert a breaking attribute visiting order change)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a34d0f1 into rust-lang:master May 30, 2024
@rustbot rustbot added this to the 1.80.0 milestone May 30, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
Rollup merge of rust-lang#125723 - GuillaumeGomez:migrate-run-make-crate-data-smoke, r=jieyouxu

Migrate `run-make/crate-data-smoke` to `rmake.rs`

Part of rust-lang#121876.

r? ``@jieyouxu``
@GuillaumeGomez GuillaumeGomez deleted the migrate-run-make-crate-data-smoke branch May 30, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants